package com.creatshare.controller;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.creatshare.bean.ProjectCategory;

@Controller
public class ProjectCategoryController extends BaseController {

	@RequestMapping(value = "/projectcategories", method = RequestMethod.GET)
	public @ResponseBody Object list() {
		List<ProjectCategory> projectCategoryList = projectCategoryService.getAllProjectCategory();
		resultInfo.setCode(1);
		resultInfo.setData(projectCategoryList);
		return JSONObject.toJSON(resultInfo);
	}

}
